﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Apps/MasterPage.master" AutoEventWireup="false" CodeFile="report_stp_sub_menu.aspx.vb" Inherits="Apps_report_stp_sub_menu" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" Runat="Server">
    <table width="50%"  border="1" align="center" cellpadding="2" cellspacing="2" bordercolor="#999999">
        <tr align="center" bgcolor="#99FFFF">
            <td colspan="2" bgcolor="#FFFFFF" class="th_data">
                ข้อมูลเมนูย่อยระบบงาน</td>
        </tr>
        <tr align="left">
            <td width="47%" bordercolor="#CCCCCC" class="td_box">
                ระบบงาน :</td>
            <td width="53%" bordercolor="#CCCCCC" class="td_box">
                <asp:DropDownList ID="ddlStpMainSystem" runat="server" 
                    DataSourceID="ddlStpMainSystemSrc" DataTextField="main_system_name" 
                    DataValueField="main_system_code" AppendDataBoundItems="True" 
                    AutoPostBack="True">
                    <asp:ListItem Text="ระบบงาน" Value="0"></asp:ListItem>
                </asp:DropDownList>
                <asp:SqlDataSource ID="ddlStpMainSystemSrc" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" SelectCommand="select main_system_name , main_system_code from stp_main_system
                where main_system_type > 0 and main_system_status = 1"></asp:SqlDataSource>
            </td>
        </tr>
        <tr align="left">
            <td width="47%" bordercolor="#CCCCCC" class="td_box">
                เมนูระบบงาน :</td>
            <td width="53%" bordercolor="#CCCCCC" class="td_box">
                <asp:DropDownList ID="ddlStpMenuSystem" runat="server" 
                    DataSourceID="ddlStpMenuSystemSrc" DataTextField="menu_system_name" 
                    DataValueField="menu_system_code">
                    
                </asp:DropDownList>
                <asp:SqlDataSource ID="ddlStpMenuSystemSrc" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" SelectCommand="select menu_system_code  =  0, menu_system_name  = 'เมนูระบบงาน'

union all

select menu_system_code , menu_system_name 
from stp_menu_system
where main_system_code  =  @main_system_code
and menu_system_status = 1 ">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddlStpMainSystem" DefaultValue="0" 
                            Name="main_system_code" PropertyName="SelectedValue" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr align="left">
            <td width="47%" bordercolor="#CCCCCC" class="td_box">
                สถานะการใช้งาน :</td>
            <td width="53%" bordercolor="#CCCCCC" class="td_box">
                <asp:DropDownList ID='ddlStatus' runat="server">
                    <asp:ListItem Text='สถานะ' Value='0'></asp:ListItem>
                    <asp:ListItem Text='ใช้งาน' Value='1'></asp:ListItem>
                    <asp:ListItem Text='ไม่ใช้งาน' Value='2'></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr align="center">
            <td colspan="2" bordercolor="#CCCCCC" class="td_data_end">
                <asp:Button ID='btnFilter' Text='แสดงรายงาน'  runat='server' />
                <asp:Button ID='btnMainMenu' Text='<%$ Resources:Resource,BTN_MAINMENU %>' runat='server' PostBackUrl="~/Apps/ViewSystem.aspx?Edit=2" />
            </td>
        </tr>
    </table>
</asp:Content>

